![]() |
WOLF core
WOLF: A Modular Estimation Framework for Robotics
|
Base class of features: a measurement with its uncertainty, extracted from a capture, with the factors it produces. More...
#include <core/feature/feature_base.h>
Public Types | |
| enum | UncertaintyType { UNCERTAINTY_IS_COVARIANCE , UNCERTAINTY_IS_INFO , UNCERTAINTY_IS_STDDEV } |
| Type of the measurement uncertainty passed to the constructor. More... | |
Public Member Functions | |
| FeatureBase (const std::string &_type, const Eigen::VectorXd &_measurement, const Eigen::MatrixXd &_meas_uncertainty, UncertaintyType _uncertainty_type=UNCERTAINTY_IS_COVARIANCE) | |
| Constructor from the measurement and its uncertainty. More... | |
| ~FeatureBase () override=default | |
| virtual void | remove (bool viral_remove_parent_without_children=false) |
| Removes the feature and its factors. More... | |
| bool | hasChildren () const override |
| Returns whether the node has children in the Wolf tree. More... | |
| unsigned int | id () const |
| Returns the feature id. More... | |
| unsigned int | trackId () const |
| Returns the id of the feature track. More... | |
| void | setTrackId (unsigned int _tr_id) |
| Sets the id of the feature track. More... | |
| unsigned int | landmarkId () const |
| Returns the id of the landmark. More... | |
| void | setLandmarkId (unsigned int _lmk_id) |
| Sets the id of the landmark. More... | |
| double | getMeasurement (unsigned int _ii) const |
| Returns _ii component of measurement vector. More... | |
| const Eigen::VectorXd & | getMeasurement () const |
| Returns the measurement vector. More... | |
| const Eigen::MatrixXd & | getMeasurementCovariance () const |
| Returns the measurement covariance. More... | |
| Eigen::MatrixXd | getMeasurementInformation () const |
| Returns the measurement information matrix. More... | |
| const Eigen::MatrixXd & | getMeasurementSquareRootInformationUpper () const |
| Returns the upper triangular square root of the measurement information matrix. More... | |
| const Eigen::VectorXd & | getExpectation () const |
| Returns the expected measurement. More... | |
| void | setExpectation (const Eigen::VectorXd &expectation) |
| Sets the expected measurement. More... | |
| FrameBaseConstPtr | getFrame () const |
| Returns the frame of the capture the feature belongs to. More... | |
| FrameBasePtr | getFrame () |
| Returns the frame of the capture the feature belongs to. More... | |
| CaptureBaseConstPtr | getCapture () const |
| Returns the capture the feature belongs to (nullptr if none) More... | |
| CaptureBasePtr | getCapture () |
| Returns the capture the feature belongs to (nullptr if none) More... | |
| FactorBaseConstPtrList | getFactorList () const |
| Returns the factors of the feature. More... | |
| FactorBasePtrList | getFactorList () |
| Returns the factors of the feature. More... | |
| void | getFactorList (FactorBaseConstPtrList &_fac_list) const |
| Adds the factors of the feature to a list. More... | |
| void | getFactorList (FactorBasePtrList &_fac_list) |
| Adds the factors of the feature to a list. More... | |
| bool | hasFactor (FactorBaseConstPtr _fac) const |
| Returns whether the factor belongs to the feature. More... | |
| void | link (CaptureBasePtr cap_ptr) |
| Links the feature to a capture. More... | |
| virtual void | printHeader (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream, std::string _tabs="") const |
| Prints the information of this node (not of its children) More... | |
| void | print (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream=std::cout, std::string _tabs="") const |
| Prints this node and, depending on the depth, its children. More... | |
| virtual CheckLog | localCheck (bool _verbose, std::ostream &_stream, std::string _tabs="") const |
| Checks the consistency of this node (not of its children) More... | |
| bool | check (CheckLog &_log, bool _verbose, std::ostream &_stream, std::string _tabs="") const |
| Checks the consistency of this node and its children, composing the log. More... | |
Public Member Functions inherited from wolf::NodeBase | |
| NodeBase (const std::string &_category, const std::string &_type="Undefined", const std::string &_name="") | |
| Constructor. More... | |
| virtual | ~NodeBase ()=default |
| Destructor. More... | |
| unsigned int | nodeId () const |
| Returns the node id, unique over the whole Wolf tree. More... | |
| std::string | getCategory () const |
| Returns the category of the node. More... | |
| std::string | getType () const |
| Returns the type (subcategory) of the node. More... | |
| std::string | getName () const |
| Returns the name of the node. More... | |
| bool | isRemoving () const |
| Returns whether the node is being removed. More... | |
| virtual bool | hasChildren () const =0 |
| Returns whether the node has children in the Wolf tree. More... | |
| void | setType (const std::string &_type) |
| Sets the type (subcategory) of the node. More... | |
| void | setName (const std::string &_name) |
| Sets the name of the node. More... | |
| ProblemConstPtr | getProblem () const |
| Returns the problem the node belongs to. More... | |
| ProblemPtr | getProblem () |
| Returns the problem the node belongs to. More... | |
Static Public Member Functions | |
| template<typename classType , typename... T> | |
| static std::shared_ptr< classType > | emplace (CaptureBasePtr _cpt_ptr, T &&... all) |
| Creates a feature of class classType and links it to the capture. More... | |
Protected Attributes | |
| unsigned int | feature_id_ |
| Feature id, unique among features. More... | |
| unsigned int | track_id_ |
| ID of the feature track. More... | |
| unsigned int | landmark_id_ |
| ID of the landmark. More... | |
| Eigen::VectorXd | measurement_ |
| Measurement vector. More... | |
| Eigen::MatrixXd | measurement_covariance_ |
| Measurement covariance matrix. More... | |
| Eigen::MatrixXd | measurement_sqrt_information_upper_ |
| Upper square root of the information matrix. More... | |
| Eigen::VectorXd | expectation_ |
| Expected measurement. More... | |
Protected Attributes inherited from wolf::NodeBase | |
| ProblemWPtr | problem_ptr_ |
| Problem the node belongs to. More... | |
| unsigned int | node_id_ |
| Node id. It is unique over the whole Wolf Tree. More... | |
| std::string | node_category_ |
| Text label identifying the category of node ("SENSOR", "FEATURE", etc) More... | |
| std::string | node_type_ |
| Type or subcategory of node (derived class name: "SensorOdom2d", etc) More... | |
| std::string | node_name_ |
| bool | is_removing_ |
| A flag for safely removing nodes from the Wolf tree. See remove(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from wolf::NodeBase | |
| virtual void | setProblem (ProblemPtr _prob_ptr) |
| Sets the problem the node belongs to. More... | |
Base class of features: a measurement with its uncertainty, extracted from a capture, with the factors it produces.
| wolf::FeatureBase::FeatureBase | ( | const std::string & | _type, |
| const Eigen::VectorXd & | _measurement, | ||
| const Eigen::MatrixXd & | _meas_uncertainty, | ||
| UncertaintyType | _uncertainty_type = UNCERTAINTY_IS_COVARIANCE |
||
| ) |
Constructor from the measurement and its uncertainty.
| _type | derived type name |
| _measurement | the measurement |
| _meas_uncertainty | the uncertainty of the measurement (see _uncertainty_type) |
| _uncertainty_type | whether _meas_uncertainty is a covariance or an information matrix (std dev not implemented) |
|
overridedefault |
| bool wolf::FeatureBase::check | ( | CheckLog & | _log, |
| bool | _verbose, | ||
| std::ostream & | _stream, | ||
| std::string | _tabs = "" |
||
| ) | const |
Checks the consistency of this node and its children, composing the log.
|
static |
Creates a feature of class classType and links it to the capture.
|
inline |
Returns the capture the feature belongs to (nullptr if none)
|
inline |
Returns the capture the feature belongs to (nullptr if none)
|
inline |
Returns the expected measurement.
|
inline |
Returns the factors of the feature.
|
inline |
Returns the factors of the feature.
| void wolf::FeatureBase::getFactorList | ( | FactorBaseConstPtrList & | _fac_list | ) | const |
Adds the factors of the feature to a list.
| void wolf::FeatureBase::getFactorList | ( | FactorBasePtrList & | _fac_list | ) |
Adds the factors of the feature to a list.
| FrameBasePtr wolf::FeatureBase::getFrame | ( | ) |
Returns the frame of the capture the feature belongs to.
| FrameBaseConstPtr wolf::FeatureBase::getFrame | ( | ) | const |
Returns the frame of the capture the feature belongs to.
|
inline |
Returns the measurement vector.
|
inline |
Returns _ii component of measurement vector.
WARNING: To be fast, it does not check that index _ii is smaller than dimension.
|
inline |
Returns the measurement covariance.
|
inline |
Returns the measurement information matrix.
|
inline |
Returns the upper triangular square root of the measurement information matrix.
|
inlineoverridevirtual |
Returns whether the node has children in the Wolf tree.
Implements wolf::NodeBase.
| bool wolf::FeatureBase::hasFactor | ( | FactorBaseConstPtr | _fac | ) | const |
Returns whether the factor belongs to the feature.
|
inline |
Returns the feature id.
|
inline |
Returns the id of the landmark.
| void wolf::FeatureBase::link | ( | CaptureBasePtr | cap_ptr | ) |
Links the feature to a capture.
|
virtual |
Checks the consistency of this node (not of its children)
| void wolf::FeatureBase::print | ( | int | depth, |
| bool | factored_by, | ||
| bool | metric, | ||
| bool | state_blocks, | ||
| std::ostream & | stream = std::cout, |
||
| std::string | _tabs = "" |
||
| ) | const |
Prints this node and, depending on the depth, its children.
|
virtual |
Prints the information of this node (not of its children)
|
virtual |
Removes the feature and its factors.
| viral_remove_parent_without_children | if true, removes the capture if it is left without children |
|
inline |
Sets the expected measurement.
|
inline |
Sets the id of the landmark.
|
inline |
Sets the id of the feature track.
|
inline |
Returns the id of the feature track.
|
protected |
Expected measurement.
|
protected |
Feature id, unique among features.
|
protected |
ID of the landmark.
|
protected |
Measurement vector.
|
protected |
Measurement covariance matrix.
|
protected |
Upper square root of the information matrix.
|
protected |
ID of the feature track.